package com.chenjia.proto.converter.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 控制某个字段的转换过程
 */
@Target(value = ElementType.FIELD)
@Retention(value = RetentionPolicy.RUNTIME)
public @interface ProtoField {

    /**
     * Retrieve field name in the protobuf message declaration.
     *
     * @return Name of the field in the protobuf dto class or empty string if name matches the name of annotated field.
     */
    String name() default "";
}
